'use client'
import React, {useState} from "react"
import styles from "./index.module.scss"

interface BtnsProps{
  className?: string
  id: string | number
  btns: Array<{icon: string, txt: string, clickHandle: () => void}>
}

const Btns: React.FC<BtnsProps> = ({className = '', id, btns = []}) => {
  return(<div className={`${className} ${styles['btns-componet']}`}>
    <div className={`${styles["active-list"]}`}>
      {btns.map((active, i) => <div key={i} className={`${styles['active-item']}`} onClick={active.clickHandle}><span className={`${styles["icon"]}`}><span className={`fa ${active.icon}`}></span></span>{active.txt}</div>)}
    </div>
  </div>)
}

export default Btns;